﻿using System.ComponentModel.DataAnnotations;

namespace EMC.VISITOR.Application;

    /// <summary>
    /// 自定义编码规则基础输入参数
    /// </summary>
    public class BD_CodeGenerationBaseInput
    {
        /// <summary>
        /// 表单类型
        /// </summary>
        public virtual OrderType? OrderType { get; set; }
        
        /// <summary>
        /// 提交时间
        /// </summary>
        public virtual CodeGenerationDateType? DateType { get; set; }
        
        /// <summary>
        /// 流水号
        /// </summary>
        public virtual int? Serialnumber { get; set; }
        
        /// <summary>
        /// 编号前缀
        /// </summary>
        public virtual string? Prefix { get; set; }
        
        /// <summary>
        /// 编号生成规则描述
        /// </summary>
        public virtual string? FromRuleString { get; set; }
        
        /// <summary>
        /// 编号生成规则
        /// </summary>
        public virtual string? FromRule { get; set; }
        
    }

    /// <summary>
    /// 自定义编码规则分页查询输入参数
    /// </summary>
    public class BD_CodeGenerationInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string SearchKey { get; set; }

              /// <summary>
             /// 表单类型
             /// </summary>
             public OrderType? OrderType { get; set; }
             
    }

    /// <summary>
    /// 自定义编码规则增加输入参数
    /// </summary>
    public class AddBD_CodeGenerationInput : BD_CodeGenerationBaseInput
    {
        /// <summary>
        /// 表单类型
        /// </summary>
        [Required(ErrorMessage = "表单类型不能为空")]
        public override OrderType? OrderType { get; set; }
        
        /// <summary>
        /// 提交时间
        /// </summary>
        [Required(ErrorMessage = "提交时间不能为空")]
        public override CodeGenerationDateType? DateType { get; set; }
        
        /// <summary>
        /// 流水号
        /// </summary>
        [Required(ErrorMessage = "流水号不能为空")]
        public override int? Serialnumber { get; set; }
        
        /// <summary>
        /// 编号生成规则描述
        /// </summary>
        [Required(ErrorMessage = "编号生成规则描述不能为空")]
        public override string? FromRuleString { get; set; }
        
    }

    /// <summary>
    /// 自定义编码规则删除输入参数
    /// </summary>
    public class DeleteBD_CodeGenerationInput : BaseIdInput
    {
    }

    /// <summary>
    /// 自定义编码规则更新输入参数
    /// </summary>
    public class UpdateBD_CodeGenerationInput : BD_CodeGenerationBaseInput
    {
        /// <summary>
        /// Id
        /// </summary>
        [Required(ErrorMessage = "Id不能为空")]
        public long? Id { get; set; }
        
    }

    /// <summary>
    /// 自定义编码规则主键查询输入参数
    /// </summary>
    public class QueryByIdBD_CodeGenerationInput : DeleteBD_CodeGenerationInput
    {

    }
